# Maintainer: Filipe Laíns (FFY00) <lains@archlinux.org>

_pkgname=treelib
pkgname=python-$_pkgname
pkgver=1.6.4
pkgrel=2
pkgdesc='An efficient implementation of tree data structure'
arch=('any')
url='https://github.com/caesar0301/treelib'
license=('Apache2')
depends=('python' 'python-six')
makedepends=('python-setuptools')
checkdepends=('python-pytest')
source=("https://pypi.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('09524d43c4ed732c73e33dcf5d8da73cffaabd30ec35007f87820d1f6aea75f68249c6bdb0e264b58601ba8af51396cecfe8e7399654517add3b64d57e04c56d')

build() {
  cd $_pkgname-$pkgver

  python setup.py build
}

check() {
  cd $_pkgname-$pkgver

  python -m pytest
}

package() {
  cd $_pkgname-$pkgver

  python setup.py install --root="$pkgdir" --optimize=1 --skip-build

  install -Dm 644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}

# vim:set ts=2 sw=2 et:
